home *** CD-ROM | disk | FTP | other *** search
/ Borland JBuilder 6 / jbuilder6.iso / Documents / JAVA Programming / examples / 18 / SimpleImageLoad.java < prev    next >
Encoding:
Java Source  |  2000-09-08  |  401 b   |  16 lines

  1. /* <title>SimpleImageLoad</title>
  2. * <applet code="SimpleImageLoad" width=300 height=150>
  3. * <param name="img" value="mupk.gif">
  4. * </applet>
  5. */
  6. import java.applet.*;
  7. import java.awt.*;
  8. public class SimpleImageLoad extends Applet { 
  9. Image art;
  10. public void init() {
  11. art = getImage(getDocumentBase(), getParameter("img"));
  12. }
  13. public void paint(Graphics g) {
  14. g.drawImage(art, 0, 0, this);
  15. } }
  16.